package com.bl.weilan.dao.repository;

import com.bl.weilan.dao.model.TradeInstitutionEntity;
import com.bl.weilan.dao.model.TradePolicyEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface TradePolicyRepository extends JpaRepository<TradePolicyEntity, String> {
    List<TradePolicyEntity> findByTradeId(String tradeId);
    Page<TradePolicyEntity> findByTradeIdOrderByTimeDesc(String id, Pageable pageable);
    Page<TradePolicyEntity> findByTradeIdOrderByTimeAsc(String id, Pageable pageable);
}
